package com.own.business.system.menu.business.service;

import com.own.business.system.menu.entity.bo.SystemUserRoleBo;
import com.own.business.system.menu.entity.map.SystemUserRoleMapVo;
import com.own.business.system.menu.entity.po.SystemUserRole;
import com.own.business.system.menu.entity.query.SystemUserRoleQuery;
import com.own.business.system.menu.entity.vo.SystemUserRoleVo;
import com.own.component.common.base.service.BaseService;

import java.util.List;

/**
 * SystemUserRoleService
 *
 * @author chenxueli
 * @date 2024-03-31 10:00:18
 */
public interface SystemUserRoleService extends BaseService<
        SystemUserRole,
        SystemUserRoleBo,
        SystemUserRoleVo,
        SystemUserRoleMapVo,
        SystemUserRoleQuery
        > {

    /**
     * 根据用户id查询角色id列表
     *
     * @param userId 用户id
     * @return 角色id列表
     */
    List<Long> listRoleIdListByUserId(Long userId);

    /**
     * 根据用户id删除用户角色关联
     *
     * @param userId 用户id
     */
    void deleteByUserId(Long userId);

    /**
     * 根据角色id删除
     *
     * @param roleId 角色id
     */
    void deleteByRoleId(Long roleId);

}

